﻿using System.Collections.Generic;
using System.Linq;
using BLL.Configuration.CDN;

namespace BLL.Configuration
{
    /// <summary>
    /// Setting for CDN
    /// </summary>
    public class CdnConfig
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CdnConfig"/> class.
        /// </summary>
        public CdnConfig()
        {
            Items = new Dictionary<string, string>();

            foreach (var item in CdnContentSection.Current.Url.Cast<CdnElement>())
                Items.Add(item.Name, item.Value);
        }

        /// <summary>
        /// Gets or sets the items for CDN Settings.
        /// </summary>
        /// <value>
        /// The items.
        /// </value>
        public Dictionary<string, string> Items { get; private set; }
    }
}